﻿/*
 * User: Masy Freddy
 * Date: 20/09/2011
 * Time: 12:32
 */
namespace MetaVideoEditorEvolved.AddIn.AddInAdapters
{
	using System;
	using System.AddIn.Pipeline;
	using MetaVideoEditorEvolved.AddIn.AddInViews;
	using MetaVideoEditorEvolved.AddIn.Contracts;
	using MetaVideoEditorEvolved.AddIn.Entity;

	[AddInAdapter]
	public class ReaderAdapter : ContractBase, IReaderContract
	{
		private ReaderView view;

		public ReaderAdapter(ReaderView view)
		{
			this.view = view;
		}
		
		public Movie ReadMovie(string mediaLocation)
		{
			return this.view.ReadMovie(mediaLocation);
		}
		
		public Serie ReadSerie(string mediaLocation)
		{
			return this.view.ReadSerie(mediaLocation);
		}
		
		public Season ReadSeason(string mediaLocation)
		{
			return this.view.ReadSeason(mediaLocation);
		}
		
		public Episode ReadEpisode(string mediaLocation)
		{
			return this.view.ReadEpisode(mediaLocation);
		}
		
		public void ShowOption()
		{
			AppDispatcher.Current.DoWork(delegate()
			                             {
			                             	this.view.ShowOption();
			                             });
		}
		
		public bool HasOption()
		{
			return this.view.HasOption();
		}
	}
}
